﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

namespace BaoJian.P.Control
{
    /// <summary>
    /// 互换产品列表
    /// </summary>
    public partial class ProductList : System.Web.UI.UserControl
    {
        public int Count;
        /// <summary>
        /// 栏目ID
        /// </summary>
        public string ColumnID;        
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {       
                string sql = string.Format("select top {0} * from VHotExchangeDefault where PColumn='{1}'ORDER BY [TopProduct] DESC,sid desc",Count,ColumnID);
                DataTable dt = Maticsoft.DBUtility.DbHelperSQL.Query(sql).Tables[0];
                Repeater1.DataSource = dt;
                Repeater1.DataBind();
            }
        }
    }
}